<template>
  <v-details :inputConfig="inputConfig" :detailData="inputData" @changeData="changeData" :rules="rules" ref="input"></v-details>
</template>

<script>
import details from 'commons/Detail'
import baseMixin from '@/mixins/BaseMixin'

export default {
  props: {
    inputData: {
      type: Object
    }
  },
  mixins: [baseMixin],
  name: '',
  data() {
    return {
      rules: {
        totalkey: [{ required: true, trigger: 'blur' }]
      }
    }
  },
  computed: {
    inputConfig() {
      return [
        [
          {
            type: 'input',
            label: this.$t('outbound.db_logid'),
            props: 'db_logid',
            disabled: true
          }
        ],
        [
          {
            type: 'input',
            label: this.$t('config.wareName'),
            props: 'db_alias'
          }
        ],
        [
          {
            type: 'select',
            label: this.$t('config.activityStatus'),
            props: 'isactive',
            options: [
              { code: '1', description: this.$t('code.yes') },
              { code: '0', description: this.$t('code.no') }
            ]
          }
        ],
        [
          {
            type: 'input',
            label: this.$t('outbound.db_locationnounid'),
            props: 'db_locationnounid',
            disabled: true
          }
        ],
        [
          {
            type: 'select',
            label: '仓库应急等级',
            props: 'db_level',
            options: [
              { code: '1', description: '一级' },
              { code: '2', description: '二级' },
              { code: '3', description: '三级' }
            ]
          }
        ]
      ]
    }
  },
  methods: {
    changeData(data) {
      this.$parent.$parent.saveStatus = false
    }
  },
  mounted() {},
  watch: {},
  components: {
    'v-details': details
  }
}
</script>

<style scoped>
</style>
